import {action} from 'mobx'
// import * as service from './service'
import Todo from './state'

// 包含同步和异步的action
// 由于异步action有async前缀，所以同步异步的action很容易区分，所以没有对两种action分文件存放
export default class Actions {

    constructor(state) {
        this.state = new Todo(state)
    }

    @action.bound toggle() {
        this.state.finished = !this.state.finished;
    }
}